<?php

/**
 * 自动化加载
 * @author qoyf <qoyf@vip.qq.com>
 */
defined('API_ROOT') || define('API_ROOT', dirname(__DIR__) . '/../');
defined('ROOT') || define('ROOT', dirname(__DIR__));

spl_autoload_register("autoload",true);
function autoload($className) {
    $pvarr = explode("\\", $className);
    $purl = API_ROOT . "/" . implode("/", $pvarr) . ".php";
//     echo $purl."\n";
    if (file_exists($purl)) {

        require_once $purl;
    } else {
        //echo $purl;
    }
}
